<?php
if (isset($GLOBALS["HTTP_RAW_POST_DATA"])){
    $jpg = $GLOBALS["HTTP_RAW_POST_DATA"];
    header('Content-Type: image/jpeg');
    header("Content-Disposition: attachment; filename=image.jpg");
    echo $jpg;
}
?>